//
//  ViewController.m
//  JKHit
//
//  Created by 王冲 on 2019/1/27.
//  Copyright © 2019年 JK科技有限公司. All rights reserved.
//

#import "ViewController.h"
#import "JKView.h"
@interface ViewController ()
{
    
}
@end

@implementation ViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    
    self.view.backgroundColor = [UIColor brownColor];
    
    // 设置 JKView 只有 视图中心的内切圆可以点击
    JKView *jkView = [[JKView alloc]initWithFrame:CGRectMake(50, 100, 100, 100)];
    jkView.backgroundColor = [UIColor yellowColor];
    [self.view addSubview:jkView];
    
    UITapGestureRecognizer *tap = [[UITapGestureRecognizer alloc]initWithTarget:self action:@selector(click)];
    [jkView addGestureRecognizer:tap];
    
    UIButton *button = [[UIButton alloc]initWithFrame:CGRectMake(50,50, 100, 100)];
    [button addTarget:self action:@selector(click) forControlEvents:UIControlEventTouchUpInside];
    [button setBackgroundColor:[UIColor purpleColor]];
    [jkView addSubview:button];

    
}

-(void)click{
    
    NSLog(@"click");
}


@end
